//
//  UIViewController+CAAnimate.m
//  meiyaya
//
//  Created by 张领瑞 on 2017/8/31.
//  Copyright © 2017年 ShiFeiEr. All rights reserved.
//

#import "UIViewController+CAAnimate.h"

@implementation UIViewController (CAAnimate)
-(void)transitionAnimate{
    //修改modal动画
    //需present时设置animated为no
    CATransition *animate = [CATransition animation];
    [animate setDuration:0.3];
    [animate setType:kCATransitionMoveIn];
    [animate setSubtype:kCATransitionFromRight];
    [[UIApplication sharedApplication].keyWindow.layer addAnimation:animate forKey:nil];
}
@end
